<script type="text/javascript">
function fsend(id,type,status)
{
   if(type == 'sms' || type == 'email'){
     if(status == 'passed'){var prompt = "确定要批准吗？";}
     if(status == 'unpassed'){var prompt = "确定要删除吗？";}
   
     if(status == 'passed' || status == 'unpassed'){
      if(!confirm(prompt)) return false;
     //var url = '/fsend/fsend_status/'+type+'/'+status+'/'+id; 
     //window.location = url;
     $.post('/fsend/fsend_status/'+type+'/'+status+'/'+id,function(data){
            data = parseInt(data);
            if(!data)alert("对不起,操作失败");
            window.location.reload();      
     });
     
     }
   }
}

//新开页面查看邮件
function openwin(task_id){
   url = '/fsend/fsend_email/'+task_id;
   window.open (url, "newwindow", "toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no")
}

//切换城市
   function chg_url(type,city)
{
	  var url = '/fsend/list/'+type+'/'+city+'/1'; 
	  window.location = url;
}
</script>
